pub mod plc;

use super::{json, Base, MapSv, Resp, SvCache, VBase, VMap, Value};
use base::{err, err_value, ok, throw_err, ECode};

pub async fn doit(para: &Value, cmd: &str, cache: SvCache) -> Resp {
    match cmd {
        "put" | "get" | "clear" => {
            let v = plc::Plc::new(cache);
            v.do_cmd(para, cmd).await
        }
        _ => throw_err!(ECode::NoServe, "no cmd"),
    }
}
